﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Usual;
using System.Collections;
using DBUtility;
using DoctorWorkstationManage;

namespace DoctorWorkstation
{
    public partial class DoctorWorkstationForm : Form
    {
        private EmrUC.DataGridPage dataGridPage1;
        private EmrUC.DataGridPage dataGridPage2;

        Usual.SystemPopedomManage sp = new Usual.SystemPopedomManage();
        int num1;
        int num2;
        public static string[] colNameSetdoctorList = new string[] { "S_STATE;文书状态", "PA_RYKB;所在科室", "PA_BINGAN_CODE;病案号", "PA_BEINHOSPITAL_CODE;住院号", "PA_NAME;姓名", "PA_SEX;性别", "SIC_SIC_COD;床号", "PA_BEINHOSPITAL_GREE;住院次数", "PA_RY_TIME;入院日期", "PA_PRITHTIME;年龄", "PA_LEAVEHOSPITAL_BOOKINTIME;出院日期", "SIC_SIC_COD;床位号", "ID;上级医生", "PA_DIAGNOSE_DR;经治医师", "PA_RY_TIME;住院天数", "PA_DIAGNOSE;诊断结果", "PA_HIS_BEINHOSPITAL_CODE:HIS住院号" };
        private System.Windows.Forms.GroupBox groupBox13;
        public static string[] colNameNotSetdoctorList = new string[] { "SIC_SIC_COD;床位号", "PA_BINGAN_CODE;病案号", "PA_BEINHOSPITAL_CODE;住院号", "PA_BEINHOSPITAL_GREE;住院次数", "PA_NAME;姓名", "PA_SEX;性别", "PA_RY_TIME;入院日期", "PA_DIAGNOSE;诊断结果", "EM_NAME;门诊医生" };
        private UserInfo uinfo;
        Usual.SystemPopedomManage sy = new Usual.SystemPopedomManage();
        DoctorWorkstation.Public.Public_DW pu = new DoctorWorkstation.Public.Public_DW();


        public DoctorWorkstationForm()
        {
            InitializeComponent();
            this.dataGridPage1 = new EmrUC.DataGridPage();
            this.dataGridPage2 = new EmrUC.DataGridPage();

            this.dataGridPage1.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.dataGridPage1.CompareData = new string[] {
        "field;字段"};
            this.dataGridPage1.DataSourceName = "DBEMR";
            this.dataGridPage1.Dock = System.Windows.Forms.DockStyle.Fill;
            //this.dataGridPage1.Location = new System.Drawing.Point(0, 32);
            this.dataGridPage1.Name = "dataGridPage1";
            //this.dataGridPage1.Size = new System.Drawing.Size(1008, 624);
            this.dataGridPage1.SqlrecordString = "";
            this.dataGridPage1.TabIndex = 10;
            this.dataGridPage1.ViewRecordNum = 60;

            this.dataGridPage1.ADataGrid.Click += new System.EventHandler(this.dataGrid1_Click);
            this.dataGridPage1.ADataGrid.DoubleClick += new System.EventHandler(this.dataGrid1_DoubleClick);

            this.dataGridPage2.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
            this.dataGridPage2.CompareData = new string[] {
        "field;字段"};
            this.dataGridPage2.DataSourceName = "DBEMR";
            this.dataGridPage2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.dataGridPage2.Location = new System.Drawing.Point(0, 32);
            this.dataGridPage2.Name = "dataGridPage2";
            this.dataGridPage2.Size = new System.Drawing.Size(1008, 624);
            this.dataGridPage2.SqlrecordString = "";
            this.dataGridPage2.TabIndex = 16;
            this.dataGridPage2.ViewRecordNum = 60;
            this.dataGridPage2.ADataGrid.DoubleClick += new System.EventHandler(this.dataGrid2_DoubleClick);


            this.tabPage1.Controls.Add(this.dataGridPage1);
            this.tabPage1.Controls.Add(this.panel3);
            this.tabPage2.Controls.Add(this.dataGridPage2);
            this.tabPage2.Controls.Add(this.panel5);
        }


        private void tabControl1_SelectedIndexChanged(object sender, System.EventArgs e)
		{
		rejiggerTabControlInfo();
		}
		private void rejiggerTabControlInfo()
		{
			try
			{
				string dr_id = "A";
				if (tabControl1.TabPages[0].CanFocus)
				{
					dr_id = "B";
				}
				if (tabControl1.TabPages[1].CanFocus)
				{
					dr_id = "A";
				}
				Tab_id = dr_id;
			}
			catch (System.Exception ee)
			{
				MessageBox.Show(ee.Message,"获得数据",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
			}
		}
		#region 初始化信息
		private void DoctorWorkstationForm_Load(object sender, System.EventArgs e)
		{
            uinfo = new UserInfo();
		    initializationInfo();
		}
		private void initializationInfo()
		{
			Usual.SecurityValidate se=new Usual.SecurityValidate();
			DoctorWorkstation.Public.Public_DW p_d=new DoctorWorkstation.Public.Public_DW();
//			bool vbool=se.V_Time();
//			if(!vbool)
//			{
//				MessageBox.Show("软件使用期限已到，请及时与开发商联系","系统提示",MessageBoxButtons.OK, MessageBoxIcon.Information);
//				this.Close();
//			}
//			bool _vbool=se.V_Legitimacy();
//			if(!_vbool)
//			{
//				MessageBox.Show("非法用户，请及时与开发商联系，获取正版授权！","系统提示",MessageBoxButtons.OK, MessageBoxIcon.Information);
//				this.Close();
//			}
			string[] tagStr=this.Tag.ToString().Split(';');
			S_doc_id=uinfo.GetUserID(tagStr[0]);
			S_Doc_UserName=tagStr[0];
			S_Time=tagStr[1];
			tsDateTime=TimeSpan.Parse(tagStr[1]);
			checkDateTime=DateTime.Now-tsDateTime;
			this.checkBox_Change_DeInfo.Checked = true;
			this.checkBox_showLeaveHospitalSum.Checked = true;
			this.checkBox_showNewPatient.Checked = false;
			this.toolStripComboBox_ChooseInfo.Text="本人";
			this.getPatientInfo();
			this.getPatientInfoTwo();
			//p_d.DellAllFileInfo("*.xml");

			label3.Visible = true;
		}   

		#endregion

		#region 分页
		#region Modify By WangJunFen 2010-6-1 获取已设置住院医生患者列表数据
		private void getPatientInfo()
		{
			try
			{
				string de_id = pu.getDeId(S_doc_id);
				string do_id = S_doc_id;
				string showLeaveHospitalSum="";//是否显示出院患者
				if(this.checkBox_showLeaveHospitalSum.Checked)
					showLeaveHospitalSum = this.checkBox_showLeaveHospitalSum.Text;
				string d_id = toolStripComboBox_ChooseInfo.Text;//选择是本人还是本科室，还是本组患者总数：0

				dataGridPage1.SqlrecordString =  pu.getdatasInfoFenye(d_id, showLeaveHospitalSum,do_id, de_id);
                dataGridPage1.ViewRecordNum = 60;
				dataGridPage1.CompareData = colNameSetdoctorList;
				dataGridPage1.ReadPageFirst();
				//label_SuffererSum.Text="患者总数："+Convert.ToString(dataGridPage1.da.DataSumQuery(dataGridPage1.SqlrecordString))+"";
			}
			catch (Exception ee)
			{
				MessageBox.Show(ee.Message,"提示",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
			}
		}
		#endregion

		#region Modify By WangJunFen 2010-6-1 获取未设置住院医生患者列表数据
		private void getPatientInfoTwo()
		{
			try
			{
				DataSet ds = new DataSet();
				string de_id = pu.getDeId(S_doc_id);//科室ID
				string do_id =S_doc_id;
				string showinfo="";

				if (checkBox_showNewPatient.Checked)
					showinfo = "AAAAAA";
				else
					showinfo = "";

				dataGridPage2.SqlrecordString =  pu.getdatasInfoFenye2(de_id,showinfo);
                dataGridPage2.ViewRecordNum = 60;
				dataGridPage2.CompareData = colNameNotSetdoctorList;
				dataGridPage2.ReadPageFirst();
				/*label_Patient_Sum.Text="共计："+Convert.ToString(dataGridPage2.DataSumQuery(dataGridPage2.SqlrecordString))+"个病人";*/
			}
			catch (Exception ee)
			{
				MessageBox.Show(ee.Message,"提示",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
			}
		}
		#endregion 
		#endregion

		//刷新
		private void label_Refurbish_Click(object sender, System.EventArgs e)
		{
			this.getPatientInfo();//已分配医生
			this.getPatientInfoTwo();//未分配医生列表
		}

		//转科设置
		private void label_change_DeSet_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
		  DoctorWorkstationManage.DeparTmentAlterSet de_set=new DoctorWorkstationManage.DeparTmentAlterSet();
		  de_set.DoctorWorkstationForm=this;
		  de_set.ShowDialog();
		}

		private void label_Death_BookIn_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			if(S_Pa_Id==null)
			{
				MessageBox.Show("对不起！您还没有选中任何病人，请选择病人后进行操作。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			//***********8
			Usual.Public_DW pd=new Usual.Public_DW();
			bool vbool2=pd.V_AppointFile(S_Pa_Id,"死亡记录");
			if(vbool2)
			{
				MessageBox.Show("对不起！该病人还没有创建“死亡记录”病历文书，请先创建后再登记死亡信息。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			//
			DoctorWorkstationManage.DdeathInfoBookIn de_b=new DoctorWorkstationManage.DdeathInfoBookIn();
			de_b.DoctorWorkstationForm=this;
			de_b.ShowDialog();
		}
		#region
		private void getPart_PatientInfo()
		{
			if(this.dataGridPage1.ADataGrid.VisibleRowCount>0)
			{
				this.S_Pa_Id=this.dataGridPage1.ADataGrid[this.dataGridPage1.ADataGrid.CurrentCell.RowNumber,2].ToString();
				this.S_pa_name=this.dataGridPage1.ADataGrid[this.dataGridPage1.ADataGrid.CurrentCell.RowNumber,4].ToString();
                this.S_Pa_ZYH = this.dataGridPage1.ADataGrid[this.dataGridPage1.ADataGrid.CurrentCell.RowNumber, 3].ToString();
                this.S_Pa_ZYH_HIS = this.dataGridPage1.ADataGrid[this.dataGridPage1.ADataGrid.CurrentCell.RowNumber, 3].ToString();
			}
		}
		#endregion

		private void label_BedAmend_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			DoctorWorkstationManage.AmendSickbedNoInfo as_N=new DoctorWorkstationManage.AmendSickbedNoInfo();
			as_N.DoctorWorkstationForm=this;
			as_N.ShowDialog();
		}

		private void label_Dr_Instead_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			DoctorWorkstationManage.AmendBeInHospitalDoctorInfo abhd=new DoctorWorkstationManage.AmendBeInHospitalDoctorInfo();
			abhd.DoctorWorkstationForm=this;
			abhd.ShowDialog();
		}

		private void label_CaseHistory_State_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			arr.Add("护士长");
			arr.Add("普通护士");
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】【护士长】【普通护士】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			ArchivesManager.CaseHistoryState ca = new ArchivesManager.CaseHistoryState();
			ca.ShowDialog();
		}
		//病历文书召回
		private void label_Recall_CaseHistory_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			DoctorWorkstationManage.RetakeArchivesInfo ra=new DoctorWorkstationManage.RetakeArchivesInfo();
			ra.DoctorWorkstationForm=this;
			ra.ShowDialog();
		}
		//关闭本窗体
		private void label_Close_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		#region
	
		public void AffirmFromInfo()
		{
            
		}
		#endregion

		private void label_CaseHistory_Putin_Click(object sender, System.EventArgs e)
		{
//			ArchivesManager.LeaveHospitalBookIn le = new ArchivesManager.LeaveHospitalBookIn();
//			//le.ArchivesManagerForm.doc_id=S_doc_id;
//			le.ArchivesManagerForm=this;
//			le.ShowDialog();
		}

		private void label1_Click(object sender, System.EventArgs e)//
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			arr.Add("麻醉人员");
			arr.Add("手术人员");
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】【麻醉人员】【手术人员】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
		    DoctorWorkstationManage.LeaveHospitalBookIn le=new DoctorWorkstationManage.LeaveHospitalBookIn();
			le.DoctorWorkstationForm=this;
		    le.ShowDialog();
		}

		private void label2_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("排班医生");
			/*arr.Add("麻醉人员");
			arr.Add("手术人员");*/
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【排班医生】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			Watch.MainFrm wm=new Watch.MainFrm();
			wm.Tag=S_Doc_UserName+";"+S_Time;
			wm.ShowDialog();
		}

		private void menuItem6_Click(object sender, System.EventArgs e)
		{
			MessageBox.Show("正在建设中......","提示",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
		}

		private void toolStripComboBox_ChooseInfo_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Enter)
			{
				this.getPatientInfo();
				this.getPatientInfoTwo();
			}
		}

		private void label3_Click(object sender, System.EventArgs e)
		{
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("主任医师");
			arr.Add("副主任医师");
			arr.Add("科室医生");
			bool vbool = sy.ValidateRole(S_doc_id, "", arr, "1");
			if (!vbool)
			{
				MessageBox.Show("对不起！您无权登录，该功能权限为【高级管理员】【主任医师】【副主任医师】【科室医生】", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
            //Deleted by kyoui  20130414 begin
            /*
			if (S_Pa_Id.Length>0)
			{
				Consultation.ConFrm co=new Consultation.ConFrm();
				co.ShowInTaskbar=false;
				co.Tag=S_Doc_UserName+";"+S_Time+";"+S_Pa_Id;
				co.ShowDialog();
			}
			else
			{
				MessageBox.Show("请先选择患者！", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
			}*/
            //Deleted by kyoui  20130414 end

		}

		/// <summary>
		/// 检索新入院病人信息
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void button_S_Info_Click(object sender, System.EventArgs e)
		{
			this.getPatientInfoTwo();
		}

		private void dataGrid1_Click(object sender, System.EventArgs e)
		{
			getPart_PatientInfo();
		}

		private void dataGrid1_DoubleClick(object sender, System.EventArgs e)
		{
			if(this.dataGridPage1.ADataGrid.VisibleRowCount==0)
				return;
			ArrayList arr = new ArrayList();
			arr.Add("高级管理员");
			arr.Add("高级管理员");
			arr.Add("护士长");
			arr.Add("普通护士");
			arr.Add("麻醉人员");
			arr.Add("手术人员");
			bool vbool2 = sp.ValidateNotDirector("科室主任", S_doc_id);//本科室之人有权限产看当前医生的兵力文书(科室主任可以有权限进入)
            bool vbool4 = sp.ValidateNotDirector("主任医师", S_doc_id);
			bool vbool = sp.ValidateRole(S_doc_id, "", arr, "1");//该登陆人据不具备权限（角色）
			bool vbool1 = sp.ValidateIfTeam("", S_doc_id, pu.MZ_DoctorInfo_ID(this.dataGridPage1.ADataGrid[this.dataGridPage1.ADataGrid.CurrentCell.RowNumber,2].ToString()), "1");
			bool vbool3=sp.V_VerdictPopedom(S_doc_id,Set.SYSTEM_DATE_STRING,pu.getDeId(S_doc_id));//值班人员可以进入，书写该病人的病历文书
            if (!vbool1 && !vbool && !vbool2 && !vbool3 && !vbool4)
            //if (!vbool && !vbool2 && !vbool3)
			{
				MessageBox.Show("您暂无权限", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				return;
			}
			DoctorWorkstationManage.PatientWorksTation pat=new DoctorWorkstationManage.PatientWorksTation();
			pat.DoctorWorkstationForm=this;
			pat.ShowDialog();
		}

		private void dataGrid2_DoubleClick(object sender, System.EventArgs e)
		{
			this.inceptInfo();
		}
		#region
		//给自己（医生）添加床位病人
		private void inceptInfo()
		{
			try
			{
				if (this.dataGridPage2.ADataGrid.VisibleRowCount> 0)
				{
					bool vbool = pu.ValidateNotDoctor(S_doc_id);
					if (!vbool)
					{
						MessageBox.Show("对不起，只有科室医生才能进行此操作","提示",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
						return; 
					}
					if (MessageBox.Show("您确实要将【" + pu.GetPatientName(this.dataGridPage2.ADataGrid[this.dataGridPage2.ADataGrid.CurrentCell.RowNumber,1].ToString()) + "】病人添加为自己的床位病人吗？", "确认信息", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1) == DialogResult.Yes)
					{
						pu.addDoctorInfo(this.dataGridPage2.ADataGrid[this.dataGridPage2.ADataGrid.CurrentCell.RowNumber,1].ToString(), S_doc_id);
						amendFile_state(this.dataGridPage2.ADataGrid[this.dataGridPage2.ADataGrid.CurrentCell.RowNumber,1].ToString());
						this.refurbishForm();
					}
				}
			}
			catch (Exception ee)
			{
				MessageBox.Show(ee.Message,"提示",MessageBoxButtons.OK,MessageBoxIcon.Asterisk);
			}
		}

		//医生将患者添加成自己的患者时需要修改其状态(新加的患者状态为：未处理；已存在的患者状态为：其原来的状态)
		private void amendFile_state(string pa_id)
		{
			try
			{
				DBEmr.BLL.MR_FILE_STATE da = new DBEmr.BLL.MR_FILE_STATE();
				DBEmr.Model.MR_FILE_STATE en = new DBEmr.Model.MR_FILE_STATE();
				string hospital_code = pu.GetBeInHospital(pa_id);
				DataSet ds = new DataSet();
				ds=da.GetList(" S_PATIENT_ID = '"+pa_id+"_"+hospital_code+"'" );
				if(ds.Tables[0].Rows.Count>0)
				{
					en.S_PATIENT_ID = pa_id +"_" +pu.GetBeInHospital(pa_id);
					en.S_STATE = Convert.ToInt32(ds.Tables[0].Rows[0]["S_STATE"].ToString());
					en.S_GROUP_ID = pu.GetDoctorGroupId(S_doc_id);
					//en.S_LASTLY_TIME = DateTime.Parse(sql_help.GetServerTime());
					en.S_LASTLY_USER_ID = S_doc_id;
					en.S_LASTTIME_TIME = DateTime.Parse("1900-01-01 00:00:00");
					en.S_LASTTIME_USERID = "";
					da.Update(en);
				}
				else
				{
					en.S_PATIENT_ID = pa_id +"_" +pu.GetBeInHospital(pa_id);
					en.S_STATE = 8;
					en.S_GROUP_ID = pu.GetDoctorGroupId(S_doc_id);
					//en.S_LASTLY_TIME = DateTime.Parse(sql_help.GetServerTime());
					en.S_LASTLY_USER_ID = S_doc_id;
					en.S_LASTTIME_TIME = DateTime.Parse("1900-01-01 00:00:00");
					en.S_LASTTIME_USERID = "";
					da.Add(en);
				}
			}
			catch (Exception ee)
			{
				throw ee;
			}
		}

		private void refurbishForm()
		{	
			this.getPatientInfo();
			this.getPatientInfoTwo();
		}
		#endregion

        private void label_Patients_Click(object sender, EventArgs e)
        {
            Patients pi = new Patients();
            pi.Form1 = this;
            pi.ShowDialog();
        }

    }
}
